let s = "deeee"
var validPalindrome = function(s) {
    let left = 0
    let right = s.length-1
    let result1;
    let result2;
    while(left<right){
        if(s[left]==s[right]){
            left++
            right--
        }else{
             result1 = dg(s,left+1,right) 
            result2 = dg(s,left,right-1)
            
         if(result1||result2){
                return true
            }else{
                return false
            }
        }
    }
    return true
};
function dg(s,left,right){
    while(left<right){
        if(s[left]==s[right]){
            left++
            right--
        }else{
            return false
        }
    }
    return true
}
console.log(validPalindrome(s));
